<?php
	$script = "var updateWatchListUrl = '". $this->Html->url(array('controller' => 'ajax', 'action' => 'removeWatchList')) . "';";
	$script .= "var addWatchListUrl = '". $this->Html->url(array('controller' => 'ajax', 'action' => 'addWatchList')) ."';";
	$this->Html->scriptBlock($script, array('inline' => false));
	$this->Html->script('watch_list', array('inline' => false));
?>
<!-- .section -->
	<?php if (!$isOwner):?>
	<h2 class="title2">ウォッチリスト</h2>
	<?php if (isset($watchListInfo) && is_array($watchListInfo)):?>
		<?php echo $this->Html->image('btn_remove_watch_off.png',array('escape' => false, 'class' => 'removeFromWatchList'));?>
		<input type="hidden" id="watchListData" value="<?php echo $watchListInfo['TargetOfWatch']['id'];?>"/>
		<input type="hidden" id="teacherWatchList" value="<?php echo $watchListInfo['TargetOfWatch']['watch_id']; ?>"/>
	<?php else:?>
		<?php echo $this->Html->image('btn_add_watch_off.png', array('escape' => false, 'class' => 'addToWatchList'));?>
		<input type="hidden" id="teacherWatchList" value="<?php echo $teacherId; ?>"/>
	<?php endif;?>
	<?php endif;?>
<!-- /.section -->